import request from "@/utils/request";

// 查询全部部门数据
export const queryAllDeptApi = () => {
  return request.get("/depts");
};

//根据ID查询
export const queryDeptInfoApi = (id) => {
  return request.get(`/depts/${id}`);
};

//添加部门
export const addDeptApi = (data) => {
  return request.post("/depts", data);
};

//修改部门
export const updateDeptApi = (data) => {
  return request.put("/depts", data);
};

// 删除部门
export const deleteDeptApi = (id) => {
  return request.delete(`depts?id=${id}`);
};
